<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="probiz" tagdir="/WEB-INF/tags/probiz"%>
<%@ taglib prefix="other" tagdir="/WEB-INF/tags/other"%>
<probiz:pageHeading pageHeadingKey="contentList.heading" />
<head>
	<c:if test="${not empty param.direct}">
		<c:set var="hideMainDiv" value="true" scope="request"/>
	</c:if>
</head>

<content tag="buttons">
	<div class="line"></div>
	<probiz:iconBtn btnType="add" onclick="createContent();" />
	<probiz:iconBtn btnType="delete" onclick="deleteContents();" id="multiDelete"/>
	<probiz:iconBtn btnType="updateExpired" onclick="multiUpdateExpiredContent();" id="multiUpdateExpired"/>
</content>
<verFunc:verFuncValidate funcKey="tag">
<content tag="tags">
	<other:tagSelector selectorId="tagSelector" module="2" left="-25" applyCallbackFunc="applyTags" manageCallbackFunc="manageTags"/>
</content>
</verFunc:verFuncValidate>

<div id="contentList">
	<%@include file="include/contentSearchCriteria.jspf"%>
	
	<div class="tree">
		<div class="tree_wrap">
			<div class="hd"></div>
				<div class="content" id="categoryTree">
					<%@ include file="../catalog/include/contentCategorySelectorTreeBody.jspf"%>
				</div>
			<div class="ft"></div>
		</div>
	</div>
	<div class="tree_r">
		<div id="contentResults" class="tree_r_wrap">
			<%--ajaxLoad file="/product/include/contentListBody.jspf" --%>
		</div>
	</div>

</div>	
<%-----contentForm的div在装饰器中----%>

<%-----start:list需要加载的JS ----%>
<c:set var="plugin_tree" value="true" scope="request"/>
<script type="text/javascript"	src="${ctxPath}/scripts/probiz/content/contentListForTags.js?rs=${appConfig.rs}"></script>
<script type="text/javascript"	src="${ctxPath}/scripts/probiz/content/contentList.js?rs=${appConfig.rs}"></script>
<%-----end:  list需要加载的JS ----%>

<%-----start:form需要加载的JS ----%>
<c:set var="plugin_upload" value="true" scope="request"/>
<c:set var="plugin_newUpload" value="true" scope="request"/>
<c:set var="plugin_htmlEditor" value="true" scope="request"/>
<c:set var="ui_datepicker" value="true"  scope="request"/>
<c:set var="ui_dialog" value="true" scope="request"/>
<c:set var="ui_tabs" value="true" scope="request"/>
<c:set var="ui_sortable_js" value="true" scope="request"/>
<script type="text/javascript"	src="${ctxPath}/scripts/probiz/content/contentForm.js?rs=${appConfig.rs}"></script>
<%-----end:  form需要加载的JS ----%>
<script type="text/javascript">
$j(document).ready(function () {
	__FMTExtend = {
		contentList_selectContent:"<fmt:message key="contentList.selectContent"/>",
		contentList_multiDelete_successed:"<fmt:message key="contentList.multiDelete.successed"/>",
		contentList_multiUpdateExpired_successed:"<fmt:message key="contentList.multiUpdateExpired.successed"/>",
		
		contentForm_saveContent_success:"<fmt:message key="contentForm.saveContent.success"/>",
		contentForm_edit:"<fmt:message key="contentForm.edit"/>",
		contentForm_updateExpired_success:"<fmt:message key="contentForm.updateExpired.success"/>",
		contentForm_currentStatus:"<fmt:message key="contentForm.currentStatus"/>",
		content_delete_success:"<fmt:message key="content.delete.success"/>",
		contentDetail_recommendResult_none:"<fmt:message key="contentDetail.recommendResult.none"/>",
	    contentDetail_recommendResult_saveFirst:"<fmt:message key="contentDetail.recommendResult.saveFirst"/>",
	    contentForm_adddRecommended_noRepeat:"<fmt:message key="contentForm.adddRecommended.noRepeat"/>",
		contentForm_adddRecommended_noSelf:"<fmt:message key="contentForm.adddRecommended.noSelf"/>"
	
	};
	$j.extend(__FMT, __FMTExtend); 
});	


$j(document).ready(function () {
	searchContents(true,'');
	
	jCategoryTree = $j('#categoryTree > ul').simpleTree({
		drag:false,
		afterClick:function(node){
			clickTreeItemAction();
		},
		afterDblClick:function(node){
		},
		afterMove:function(destination, source, pos){
		},
		afterAjax:function()
		{
		},
		animate:true
		//,docToFolderConvert:true
	})[0];
	$j("#categoryTree").show();
	
	<c:if test="${(not empty param.direct) and (param.direct == 'add')}">
		createContent();
	</c:if>
});
</script>
